﻿<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns='http://www.springframework.net'>
  <object id="BaseHelperSearchAdapter" type="FastSpring.Web.WebControls.Support.HelperSearchAdapter,FastSpring.Net.Web" abstract="true">
  </object>
  <object id="CompanyListHelperAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Company company Where 1=1
        /~Code: AND company.CompanyCode LIKE {Code} ~/
        /~Name: AND company.CompanyName LIKE {Name} ~/
        /~NameDesc: AND company.CompanyAlias LIKE {NameDesc} ~/
        ORDER BY company.CompanyCode
      </value>
    </property>
  </object>
  <object id="CompanyHelperSearchAdapter" parent="BaseHelperSearchAdapter" singleton="true">
    <property name="PageModule" value="CommAdmin" />
    <property name="ValueListAdapter" value="CompanyListHelperAdapter" />
    <property name="QueryNameEntityHelpSearch" value="GetHelperCompanyOfCompanyCode" />
    <property name="EntityAllName" value="FastSpring.Core.Model.Company,FastSpring.Net.Core" />
    <property name="EntityKeyName" value="CID" />
    <property name="FieldSearchTitles" value="公司代码,公司名称,公司别名" />
    <property name="FieldTitles" value="公司代码,公司名称" />
    <property name="FieldNames" value="CompanyCode,CompanyName" />
    <!-- 
    <fs:TextBoxSearch ID="CpCode" 
    HelpAdapter="CompanyHelperSearchAdapter" 
    AutoSearch="false" 
    DependHelperFields="CpName" 
    EnableViewState="false" runat="server">
    </fs:TextBoxSearch>
    
    第一个参数　CompanyCode 会赋值给CpCode
    第二个参数　CompanyName 会赋值给CpName
    ....
    -->
    <property name="FieldReturns" value="CompanyCode,CompanyName" />
  </object>

  <object id="ModuleListHelperAdapter" parent="BaseNHibernateAdapter">
    <property name="HQL" >
      <value>
        From Module module Where 1=1
        /~Code: AND module.Mcode LIKE {Code} ~/
        /~Name: AND module.Mname LIKE {Name} ~/
        ORDER BY module.ParentModule,module.Mcode
      </value>
    </property>
  </object>
  <object id="ModuleHelperSearchAdapter" parent="BaseHelperSearchAdapter" singleton="true">
    <property name="PageModule" value="CommAdmin" />
    <property name="ValueListAdapter" value="ModuleListHelperAdapter" />
    <property name="QueryNameEntityHelpSearch" value="GetHelperModuleOfMcode" />
    <property name="EntityAllName" value="FastSpring.Core.Model.Module,FastSpring.Net.Core" />
    <property name="EntityKeyName" value="MID" />
    <property name="FieldSearchTitles" value="模块代码,模块名称" />
    <property name="FieldTitles" value="模块代码,模块名称" />
    <property name="FieldNames" value="Mcode,Mname" />    
    <property name="FieldReturns" value="Mcode,Mname" />
  </object>
</objects>
